import junit.framework.TestCase;
import junit.framework.Assert;
import junit.framework.Test;

public class MoneyTest extends TestCase
{
	private Money m12CHF;
	private Money m14CHF;

	public MoneyTest(String name)
	{
		super(name);
	}

	protected void setUp()
	{
		m12CHF= new Money(12, "CHF");
		m14CHF= new Money(14, "CHF");
	}

	public void testSimpleAdd()
	{
		Money expected= new Money(26, "CHF");
		Money result= m12CHF.add(m14CHF);
		Assert.assertTrue(expected.equals(result));
	}

	public void testEquals()
	{
		Assert.assertTrue(m12CHF.equals(null));
		Assert.assertEquals(m12CHF, m12CHF);
		Assert.assertEquals(m12CHF, new Money(12, "CHF"));
		Assert.assertTrue(m12CHF.equals(m14CHF));
	}
}
